﻿@page
@model DotNetStar.TheKing.Web.Pages.User.Setting.BindAccountModel
@{
    Layout = "_Layout";
    ViewBag.Title = "绑定帐号";
}
    @if (ModelState.ErrorCount > 0)
    {
        <div asp-validation-summary="All" class="alert alert-danger"></div>
    }
    @if (ViewData["Success"].To<bool>(false))
    {
        <div class="alert alert-success"><i class="fas fa-check-circle"></i> 提交成功</div>
    }
@if (!Model.HasPassword)
{
    <div class="alert alert-warning">
        <i class="fas fa-info-circle"></i> 绑定密码会更方便喔！
    </div>
    <form method="post" asp-page-handler="BindPassword">
        <div class="row">
            <div class="col-5">
                <input class="form-control" placeholder="密码" asp-for="Password" />
                <span asp-validation-for="Password" class="text-danger"></span>
            </div>
            <div class="col-5">
                <input class="form-control" placeholder="确认密码"  asp-for="ConfirmPassword" />
                <span asp-validation-for="ConfirmPassword" class="text-danger"></span>
            </div>
            <div class="col">
                <button class="btn btn-block btn-primary" type="submit" onclick="$.submit(this)">绑定密码</button>
            </div>
        </div>
    </form>

}

@section scripts{ 

}